home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 2572 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: oden.abc.se!usenet
  2. From: m9944@abc.se (Peter T Karlsson)
  3. Newsgroups: comp.sys.cbm
  4. Subject: Re: anyone doing heavy math on a c64?
  5. Date: 23 Feb 1996 10:01:41 +0100
  6. Organization: ABC-Klubben
  7. Message-ID: <4gjvpl$l3d@tor.abc.se>
  8. References: <4e2l0q$n8f@turing.fwi.uva.nl> <4ej26o$qmr@news.acns.nwu.edu> <4f49t9$2q5@madeline.INS.CWRU.Edu> <4fchhs$2r1@tor.abc.se>
  9.  <4ftcnm$bfs@news.acns.nwu.edu>
  10. Reply-To: dat95pkn@idt.mdh.se
  11. NNTP-Posting-Host: tor.abc.se
  12. Summary: INT(.1+.9) differs on C64 & C128
  13. X-Newsreader: wsOMR/SOUP v1.07b
  14.  
  15. I artikel '<4ftcnm$bfs@news.acns.nwu.edu>' skrev judd@merle.acns.nwu.edu (Stephen Judd) detta:
  16.  
  17.  >>C=64+64*INT(.1+.9)
  18.  >>will give C 64 for a C64 and 128 on a C128!
  19.  > I find this very interesting.  Does anyone have an explanation for 
  20.  > this?
  21.  
  22. I don't know for certain, but I guess that it was a bug in the C64 floating
  23. point arithmetics that was changed in the C128. Does anyone know if this
  24. "bug" exists in all C64:s, and that it is gone in all C128:s? I use it in
  25. all my "dual-mode" programs to determine what machine is used. I find it
  26. easier to do than to PEEK around :-)
  27.  
  28.  > I started to investigate this further.  On the 64 (at least, in 64 
  29.  > mode), INT(.1+.9) returns 0, but A=.1+.9:?INT(A) returns 1.
  30.  
  31. Interesting... The storage of A=.1+.9 is probably rounded off somewhere, but
  32. is not when using INT(.1+.9).
  33.  
  34. \\//
  35. Peter - dat95pkn@idt.mdh.se - http://www.mds.mdh.se/~dat95pkn
  36. ... ((wrong && wrong) != right)
  37.